翻訳と辞書 |
Duff's device : ウィキペディア英語版 | Duff's device
In computer science, Duff's device is an optimized implementation of a serial copy that uses a technique widely applied in assembly language for loop unwinding. Its discovery is credited to Tom Duff in November 1983, who at the time was working for Lucasfilm. It is perhaps the most dramatic use of case label fall-through in the C programming language to date.〔(Duff's device from FOLDOC )〕 Duff does not claim credit for discovering the concept of loop unrolling, just this particular expression of it in C. When used in combination with various optimizations performed by modern compilers, in some cases using Duff's device does not provide expected performance improvements. Thus, it may be advisable to perform some benchmarking of different implementations on the target computer architecture. ==Background== Loop unrolling revolves around lowering the number of branches made, by batching them together. To handle cases where the number of iterations is not divisible by the unrolled-loop increments, a common technique is to jump directly into the middle of the unrolled loop for copying the remainder. Duff was looking for a similar optimization for his case, and succeeded in doing so in C, unrolling a loop into a loop which assigns (up to) eight values on each iteration.
抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Duff's device」の詳細全文を読む
スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース |
Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.
|
|